package com.samphanie.auiu.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.samphanie.auiu.admin.domain.dto.MenuDto;
import com.samphanie.auiu.admin.domain.vo.MenuVo;
import com.samphanie.auiu.mbg.model.SysMenu;
import com.samphanie.auiu.mbg.utils.PageUtils;

import java.util.List;
import java.util.Map;

/**
 * 菜单Service接口
 *
 * @author zsy
 * @date 2021-05-18
 */
public interface ISysMenuService extends IService<SysMenu> {
    /**
     * 查询菜单列表
     *
     * @param query
     * @return 菜单集合
     */
    List<SysMenu> selectSysMenuList(Map<String, String> query);
    /**
     * 分页业务方法
     *
     * @return IPage
     */
    PageUtils listPage(Map<String, Object> query);

    boolean createMenu(MenuDto menuDto);

    boolean edit(MenuDto menuDto);

    List<MenuVo> treeMenuList();
    List<MenuVo> getUserTreeMenuList(Long userId);

    List<SysMenu> getMenuChildrenListById(Long menuId);

    boolean checkHasSubMenu(Long menuId);

    List<MenuVo> getUserMenuList(Long userId);

}
